<template>
  <div>
    <el-button type="success">重新加载</el-button>
    <el-table :data="perData" border>
      <el-table-column prop="id" label="编号"></el-table-column>
      <el-table-column prop="name" label="权限名称"></el-table-column>
      <el-table-column prop="expression" label="权限表达式"></el-table-column>
      <el-table-column label="操作"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getPermissions } from "../../request/httpApi";
export default {
  data() {
    return {
      perData: []
    };
  },
  created() {
    getPermissions({
      currentPage: 1,
      pageSize: 10000,
    //   token: localStorage.getItem("token")
    }).then(res => {
      if (res.success) {
        this.perData = res.data.list;
      }
    });
  },
  mounted() {
    // 这个时候perData能不能拿到后端返回的数据
    console.log(JSON.stringify(this.perData));
  }
};
</script>

<style>
</style>